package com.yanqu.road.server.cmd.chefduel.process2;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.chefduel.ChefDuelProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.chefduel.CrossChefDuelMgr;
import com.yanqu.road.server.protocol.CrossProtocol;

import java.util.List;

@Cmd(code = CrossProtocol.C_CROSS_CHEF_DUEL2_CHECK_FOOD_STATUS,desc = "检查菜的状态")
public class CrossDishStatusCheckCmd extends CrossCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        ChefDuelProto.CheckChefDuel2DishStatusMsg reqMsg = ChefDuelProto.CheckChefDuel2DishStatusMsg.parseFrom(packet.getBytes());
        int activityId = reqMsg.getActivityId();
        List<ChefDuelProto.NeedCheckChefDuel2DishMsg> dishList = reqMsg.getDishList();
        CrossChefDuelMgr.checkDishStatus(activityId,serverId,dishList);
    }

    @Override
    public void sendData() {

    }
}
